<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>房间管理</title>
    <link href="../lib/layui/css/layui.css" rel="stylesheet" type="text/css" media="screen"/>
    <script src="../lib/jquery-3.3.1.min.js" type="text/javascript"></script>
    <script src="../lib/layui/layui.js" type="text/javascript"></script>
    <script src="../js/basicinfo/basicRoom.js" type="text/javascript"></script>
    <script src="../lib/exportExcelUtil.js" type="text/javascript"></script>
</head>
<body class="layui-layout-body" style="background-color:white;">
<div class="layui-layout layui-layout-admin"  >
<!--    <div th:replace="common/include :: basicHeader"></div>-->
<!--    <div th:replace="common/include :: basicLeft(activeUri='basic')"></div>-->
<!--    <div class="layui-body" style="padding: 15px;">-->
<!--        <div th:replace="common/include :: basicInfoHeader(activeUri='room')"></div>-->
        <div class="query" style="padding-top: 10px; padding-left: 10px;">
            <div class="layui-inline">
                <div class="layui-form">
                    <div class="layui-input-inline">楼栋ID：</div>
                    <div class="layui-input-inline">
                        <input id="blockIdSearch"  class="layui-input" autocomplete="off" placeholder="请输入楼栋ID进行搜索">
                    </div>
                    <div class="layui-input-inline">楼层名称：</div>
                    <div class="layui-input-inline">
                        <input id="blockNameSearch"  class="layui-input" autocomplete="off" placeholder="请输入楼层名称进行搜索">
                    </div>
                    <div class="layui-input-inline">房间号码：
                    </div>
                    <div class="layui-input-inline">
                        <input id="searchName"  class="layui-input" autocomplete="off" placeholder="请输入房间号码进行搜索">
                    </div>
                </div>
            </div>
            <button class="layui-btn " lay-submit lay-filter="search_room"  id="reloadRoom">查询</button>
            <button class="layui-btn"  type="button" onclick="reloadRoom()">刷新</button>
            <button class="layui-btn"  type="button" onclick="addRoom()">添加</button>
            <button class="layui-btn"  type="button" id="sync" >同步</button>
            <button class="layui-btn"  type="button" id="import">批量导入</button>
            <button class="layui-btn"  type="button" id="exportAll" >导出全部</button>
        </div>
        <div id="content">
            <table class="layui-table" id="basicRoomTable"  lay-filter="basicRoomTable"></table>
        </div>
<!--    </div>-->

    <!-- 楼栋信息增加页面 -->
    <div style="display:none; " id="roomAdd">
        <form id="product_form_room" lay-filter="product_form_room" class="layui-form"  action="" style="padding: 20px;">
            <input style="display: none" id="roomId" name="roomId">
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">房间号码<span style="color:red">*</span></label>
                    <div class="layui-input-inline">
                        <input type="text" name="roomName" maxlength="20" placeholder="名称最长20字" lay-verify="required" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">房间描述<span style="color:red">*</span></label>
                    <div class="layui-input-inline">
                        <textarea id="roomDesc" style="width:300px; height: 100px;" placeholder="描述最长100字" name="roomDesc"  ></textarea>
                    </div>
                </div>
            </div>
            <div class="layui-form-item" >
                <div class="layui-inline">
                    <label class="layui-form-label">所属楼栋<span style="color:red">*</span></label>
                    <div class="layui-input-inline">
                        <select name="blockId" id="blockId" lay-verify="required" lay-filter="blockId" lay-search="">
                        </select>
                    </div>
                </div>
            </div>
            <input style="display: none" id="blockName" name="blockName">
            <div class="layui-form-item mt30">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit="" id="basic_form_room" lay-filter="basic_form_room">提交</button>
                    <button class="layui-btn" lay-submit="" id="basic_up_room" lay-filter="basic_up_room">更新</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>
    </div>

    <!--  批量导入  -->
    <div id="upload" style="display: none">
        <div>
            <p style="display: none;"><a id="downButton" target="_blank" href="../web/acs/downfile/roomTemplate.xlsx">1.下载模板  </a></p>
        </div>
        <form class="layui-form" style="margin-top:5%;margin-left: 1%">
            <input style="display: none" id="id">
            <div class="layui-input-inline" style="margin-left: 20px;margin-top: 2px;">
                <input type="text" id="file_name" name="file" lay-verify="required" style="width: 350px"  readonly autocomplete="off" class="layui-input">
            </div>
            <button type="button" class="layui-btn" id="uploadProductBtn">
                <i class="layui-icon">&#xe67c;</i>上传文件
            </button>
            <input type="file" style="display:none" class="layui-btn" id="uploadExcel">
            <button class="layui-btn" id="upload_form" lay-submit="" lay-filter="upload_form">提交</button>
            <button class="layui-btn" id="down_room_template" type="button"  >模板下载</button>
        </form>
    </div>

</div>

</body>

</html>